package com.xhis.homenurse.webservice.convert;

import android.util.Log;

import java.io.IOException;

import okhttp3.MediaType;
import okhttp3.RequestBody;
import retrofit2.Converter;

/**
 * @author panghuan
 * create at 18/3/22 下午2:06
 */
final class SoapRequestBodyConverter<T> implements Converter<T, RequestBody>
{
    private static final String TAG = "SoapRequestBodyConverte";

    private static final MediaType MEDIA_TYPE = MediaType.parse("text/plain; charset=UTF-8");

    @Override public RequestBody convert(T value) throws IOException
    {
        Log.v(TAG,"RequestBody:"+(String)value);
        return RequestBody.create(MEDIA_TYPE, (String)value);
    }
}
